<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>生命周期</title>
    <script src="../res/vue.js"></script>

</head>
<body >
<div id="app-1">
    {{message}}
</div>
<script>
    var app1 =new Vue({
        el:'#app-1',
        data: {
            message: 'hello vue',
        },
        created: function () {
            console.log("执行created")
        },
        beforeCreate:function(){
            console.log("执行beforeCreate")
        },
        beforeMount:function () {
            console.log("执行beforeMount");
        },
        mounted:function () {
            console.log("执行mounted");
        },
        beforeUpdate:function () {
            console.log("执行beforeUpdate");
        },
        updated:function () {
            console.log("执行updated");
        },
        beforeDestory:function () {
            console.log("beforeDestory");
        },
        destroyed:function () {
            console.log("beforeDestory");
        }

    });
</script>
</body>
</html>